<template>
<view class="pop">
  <view class="mask" v-if="mask" @touchmove.stop.prevent @click="close"></view>
  <view class="title" v-if="title">{{ title }}</view>
  <view class="line-division"></view>
  <slot></slot>
</view>
</template>

<script>
export default {
  name: "jPopup",
  props:{
    title:{
      type:String,
      default:''
    },
    mask:{
      type:Boolean,
      default: false
    }
  },

  methods:{
    close(){
      this.$emit('close')
    }
  }
}
</script>

<style lang="scss" scoped>
.pop{
  width: 600rpx;
  height: 400rpx;
  z-index: 999;
  position: fixed;
  margin: auto;
  top: -30%;
  bottom: 0;
  left: 0;
  right: 0;
  box-shadow: #555555 0 0 10rpx 1rpx;
  background-color: #ffffff;
  border-radius: 25rpx;
  .title{
    padding:  20rpx;
  }
}
</style>
